package net.comic.entities

class Comment {
	//	Persistence Attributes
	String 	comment
	boolean disabled = false
	
	Date 	dateCreated
	Date 	lastUpdated
	
	
	//	DB Relations & Constraits
	static 	belongsTo = [commentedBy:	User]
	
	static hasMany =	[answers:Answer]
	
	
	//	DB Constraits
	static constraints = {
		comment(blank:true, maxSize:1000)
	}
	
	
	//	Default order to sort
	static mapping = {
		sort "dateCreated"
	}	
}